<template>
<view class="user-container">
	<view class="flex-sub text-center bg-white">
		<view class="solid-bottom text-xl padding">
			<text class="text-black text-bold">{{notice.title}}</text>
		</view>
		  <view class="footer">时间: {{notice.timeStr}}     宣传类型：{{notice.typeName}}</view>
	</view>
	<view class="flex-sub bg-white">
		<view class="content">
			<jyf-parser :html="notice.context" ref="article"></jyf-parser>
		</view>
	</view>
</view>
</template>

<script>
	import {queryGovCiviladmin} from '../../../api/civiladmin/civiladminApi.js'
	import {replaceImgSrc} from '../../../lib/java110/utils/ImageUtil.js'
	import jyfParser from "@/components/jyf-parser/jyf-parser";

	export default {
		data() {
			return {
				notice: {},
				civiladminId: '',
				caId: ''
			};
		},
		components:{jyfParser},
		onLoad: function(options) {
			this.vc.onLoad(options);
			this.civiladminId = options.civiladminId;
			this.caId =  options.caId;
			this._loadNoticeDetail();
		},
		onShow: function() {
			let that = this;
		},
		methods: {
			_loadNoticeDetail: function() {
				let that = this;
				let _paramIn = {
					caId: that.caId,
					civiladminId: that.civiladminId,
					page: 1,
					row: 1,
				};
				queryGovCiviladmin(_paramIn).then(_data =>{
					let _json = _data;
					let notice = _json.data[0]
					notice.timeStr = notice.startTime.replace(/:\d{1,2}$/, ' ');
					that.notice = notice;
				})
			}
		}
	};
</script>
<style>
	@import "./detail.css";
</style>
